/*
 * @Author: Li Zengkun
 * @Date: 2022-09-29 15:01:51
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-29 16:48:08
 * @Description: 
 * 
 */
import { ref, computed } from "vue"
import { defineStore } from "pinia"

export const useMenuStore = defineStore('menu', () => {
    // state
    let isCollapse = ref(false)

    // getter
    let icon = computed(() => {
        return isCollapse.value ? "Expand" : "Fold"
    })

    // action
    let changeIsCollapse = () => {
        isCollapse.value = !isCollapse.value
    }
    return { isCollapse, changeIsCollapse, icon }
})